package com.stbu.service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.stbu.bean.UserBean;
import com.stbu.mapper.UserMapper;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

@Service
@RequiredArgsConstructor
public class UserService extends ServiceImpl<UserMapper, UserBean> {
    private  final UserMapper userMapper;

    public int addUser(UserBean userBean){
        try {
           return userMapper.insert(userBean);
        } catch (Exception e) {
            e.printStackTrace();
            return -1;
        }
    }
}
